/*
interface ComponentType {
  type: string;
  name: string;
  options: object;
  columns?: object;
  subform?: array;
}
*/

// 基础字段
export const basicComponents = [
  {
    type: 'input',
    name: '单行输入框',
    value: '',
    options: {
      required: true,
      dataType: 'string',
      maxlength: 50,
      tip: '',
      placeholder: '请输入内容',
      numberRange: [-99999999999, 99999999999],
      isCanEdit: false,
      precision: 2,
      defaultType: 0, // 默认值类型。0: 自定义 1: 预设多个值
      disabled: false,
      options: [],
      width: 240, // 组件宽度
      isShowPercentage: false, // 数值型是否展示百分号
      createHide: false, // 发起页隐藏
      detailHide: false, // 详情页隐藏
      isCondition: true, // 设为审批条件字段
      printHide: false, // 打印隐藏该字段
      isSecret: false,
      createShowValue: false,
      readonly: false,
      isRemark: false,
      remark: ''
    }
  },
  {
    type: 'textarea',
    name: '多行输入框',
    value: '',
    options: {
      maxlength: 500,
      placeholder: '请输入内容',
      rows: 3,
      isResponsive: false,
      tip: '',
      required: true,
      disabled: false,
      width: 240, // 组件宽度
      createHide: false, // 发起页隐藏
      detailHide: false, // 详情页隐藏
      isCondition: true, // 设为审批条件字段
      printHide: false, // 打印隐藏该字段
      readonly: false,
      isRemark: false,
      remark: ''
    }
  },
  {
    type: 'select',
    name: '下拉选择框',
    value: '',
    options: {
      multiple: false,
      disabled: false,
      placeholder: '请选择',
      required: true,
      isCondition: true, // 设为审批条件字段
      width: 240, // 组件宽度
      options: [
        { id: '选项1' }, { id: '选项2' }, { id: '选项3' }
      ],
      isRemark: false,
      remark: ''
    }
  },
  {
    type: 'radio',
    name: '单选框',
    value: '',
    options: {
      options: [
        { id: '选项1' }, { id: '选项2' }, { id: '选项3' }
      ],
      required: true,
      disabled: false,
      createHide: false, // 发起页隐藏
      detailHide: false, // 详情页隐藏
      isCondition: true, // 设为审批条件字段
      printHide: false, // 打印隐藏该字段
      readonly: false,
      isRemark: false,
      remark: ''
    }
  },
  {
    type: 'checkbox',
    name: '多选框',
    value: [],
    options: {
      options: [
        { id: '选项1' }, { id: '选项2' }, { id: '选项3' }
      ],
      required: true,
      disabled: false,
      createHide: false, // 发起页隐藏
      detailHide: false, // 详情页隐藏
      isCondition: true, // 设为审批条件字段
      printHide: false, // 打印隐藏该字段
      isRemark: false,
      remark: ''
    }
  },
  {
    type: 'date',
    name: '时间日期',
    value: '',
    options: {
      width: 240, // 组件宽度
      placeholder: '请选择',
      format: 'yyyy/MM/dd',
      isDefaultNowTime: 0, // 默认值是否为当前时间
      required: true,
      disabled: false,
      createHide: false, // 发起页隐藏
      detailHide: false, // 详情页隐藏
      isCondition: true, // 设为审批条件字段
      printHide: false, // 打印隐藏该字段,
      isRemark: false,
      remark: ''
    }
  },
  {
    type: 'switch',
    name: '开关',
    value: false,
    options: {
      required: false,
      disabled: false,
      createHide: false, // 发起页隐藏
      detailHide: false, // 详情页隐藏
      isCondition: true, // 设为审批条件字段
      printHide: false, // 打印隐藏该字段
      readonly: false
    }
  },
  {
    type: 'upAttachment',
    name: '附件',
    value: [],
    options: {
      limitFileSize: 50,
      required: true,
      disabled: false,
      createHide: false, // 发起页隐藏
      detailHide: false, // 详情页隐藏
      isCondition: true, // 设为审批条件字段
      printHide: false, // 打印隐藏该字段
      isSecret: false,
      createShowValue: false,
      readonly: false,
      isRemark: false,
      remark: ''
    }
  },
  {
    type: 'post',
    name: '职位',
    value: {},
    options: {
      width: 240, // 组件宽度
      placeholder: '请选择',
      defaultPost: 0,
      follower: null,
      isMultiple: false,
      tip: '',
      required: true,
      disabled: false,
      createHide: false, // 发起页隐藏
      detailHide: false, // 详情页隐藏
      isCondition: true, // 设为审批条件字段
      printHide: false, // 打印隐藏该字段
      readonly: false,
      isRemark: false,
      remark: ''
    }
  },
  {
    type: 'address',
    name: '地址',
    value: [],
    options: {
      width: 240, // 组件宽度
      addressType: 'province',
      placeholder: '请选择',
      tip: '',
      required: true,
      disabled: false,
      createHide: false, // 发起页隐藏
      detailHide: false, // 详情页隐藏
      isCondition: true, // 设为审批条件字段
      printHide: false, // 打印隐藏该字段
      readonly: false,
      isRemark: false,
      remark: ''
    }
  },
  {
    type: 'richEditor',
    name: '富文本框',
    value: '',
    options: {
      height: 300, // 组件高度
      editorWidth: 550, // 组件宽度
      imgRatio: 30, // 图片缩放比例
      videoWidth: 542, // 视频宽度
      videoHeight: 304, // 视频高度
      required: true,
      readonly: true, // 只读
      createHide: false, // 发起页隐藏
      detailHide: false, // 详情页隐藏
      printHide: false, // 打印隐藏该字段
      isHideField: false, // 隐藏字段名称,
      isRemark: false,
      remark: ''
    }
  },
  {
    type: 'link',
    name: '链接',
    value: '',
    options: {
      tip: '',
      placeholder: '请输入内容',
      width: 240, // 组件宽度
      defaultLinkName: '',

      required: true,
      disabled: false,
      createHide: false, // 发起页隐藏
      detailHide: false, // 详情页隐藏
      isCondition: true, // 设为审批条件字段
      printHide: false, // 打印隐藏该字段
      readonly: false,
      isRemark: false,
      remark: ''
    }
  }
];

// 增强字段
export const advanceComponents = [
  {
    type: 'title',
    name: '分组标题',
    options: {
      titleLevel: 1, // 标题层级
      describe: ''
    }
  },
  {
    type: 'grid',
    name: '栅格布局',
    span: 12,
    columns: [{ list: [] }, { list: [] }]
  },
  {
    type: 'subform',
    name: '子表单',
    value: [],
    subform: [], // 每一列配置
    options: {
      statistics: [],
      isCard: false,
      titleLevel: 1, // 标题层级
      required: true,
      hideOperation: false,
      createHide: false, // 发起页隐藏
      detailHide: false, // 详情页隐藏
      isCondition: true, // 设为审批条件字段
      printHide: false // 打印隐藏该字段
    }
  },
  {
    type: 'linkForm',
    name: '关联表单',
    value: [],
    subform: [], // 每一列配置
    options: {
      remoteParams: { // 请求数据参数
        id: '', // 表单id
        type: ''
      },
      presetFilter: {}, // 设置数据筛选条件，用于前端用回填
      presetFilterParams: '', // 设置数据筛选条件,接口用的最终传参
      isFillPreset: false, // 是否将筛选条件设为默认数据
      statistics: [],
      titleLevel: 1, // 标题层级
      isStatistics: false,
      required: true,
      createHide: false, // 发起页隐藏
      detailHide: false, // 详情页隐藏
      isCondition: true, // 设为审批条件字段
      printHide: false // 打印隐藏该字段
    }
  },
  {
    type: 'associatedApproval',
    name: '关联审批',
    value: '',
    options: {
      tip: '',
      banForms: [],
      required: true,
      titleLevel: 1, // 标题层级
      createHide: false, // 发起页隐藏
      detailHide: false, // 详情页隐藏
      isCondition: true, // 设为审批条件字段
      printHide: false // 打印隐藏该字段
    }
  },
  {
    type: 'formulaInput',
    name: '公式字段',
    value: '',
    options: {
      width: 240, // 组件宽度
      formulaOrigin: [], // 公示源
      formulaString: '', // 高级模式结果
      modeType: 1, // 0: 普通模式 1: 高级模式
      tagFormula: '',
      filterList: [], // 公式筛选列表
      dataType: 'number',
      maxlength: 50,
      tip: '',
      placeholder: '请输入',
      precision: 2,
      createHide: false, // 发起页隐藏
      detailHide: false, // 详情页隐藏
      isCondition: true, // 设为审批条件字段
      printHide: false, // 打印隐藏该字段
      readonly: false,
      isRemark: false,
      remark: ''
    }
  },
  {
    type: 'titleExplain',
    name: '标题说明',
    value: '',
    options: {
      height: 300, // 组件高度
      readonly: true, // 只读
      createHide: false, // 发起页隐藏
      detailHide: false, // 详情页隐藏
      printHide: false, // 打印隐藏该字段
      isHideField: false, // 隐藏字段名称,
      isRemark: false,
      remark: ''
    }
  }
];

// 系统字段
export const systemComponents = [
  {
    type: 'workflowId',
    name: '流水号',
    value: '',
    options: {
      prefix: '',
      createHide: true, // 发起页隐藏
      detailHide: false, // 详情页隐藏
      printHide: false, // 打印隐藏该字段,
      isRemark: false,
      remark: ''
    }
  },
  {
    type: 'createUser',
    name: '创建人',
    value: '',
    options: {
      createHide: true, // 发起页隐藏
      detailHide: false, // 详情页隐藏
      printHide: false, // 打印隐藏该字段,
      isRemark: false,
      remark: ''
    }
  },
  {
    type: 'createTime',
    name: '创建时间',
    value: '',
    options: {
      format: 'yyyy/MM/dd HH:mm:ss',
      createHide: true, // 发起页隐藏
      detailHide: false, // 详情页隐藏
      printHide: false, // 打印隐藏该字段,
      isRemark: false,
      remark: ''
    }
  },
  {
    type: 'department',
    name: '部门选择',
    value: {},
    options: {
      width: 240, // 组件宽度
      multiple: false,
      selectChild: false,
      setAuth: false,
      placeholder: '',
      defaultValue: '', // 0:用户一级部门 1:用户当前部门
      required: true,
      disabled: false,
      createHide: false, // 发起页隐藏
      detailHide: false, // 详情页隐藏
      isCondition: true, // 设为审批条件字段
      printHide: false, // 打印隐藏该字段
      readonly: false,
      isRemark: false,
      remark: ''
    }
  },
  {
    type: 'user',
    name: '人员选择',
    value: {},
    options: {
      width: 240, // 组件宽度
      userRead: false, // 所选人员默认可查
      userAuth: false, // 所选人员拥有发起人权限
      // handover: false, // 允许人员交接
      multiple: false,
      useDialog: false, // 使用弹窗选择样式

      defaultValue: '', // 1:当前用户
      userSelectValue: '',
      required: true,
      disabled: false,
      createHide: false, // 发起页隐藏
      detailHide: false, // 详情页隐藏
      isCondition: true, // 设为审批条件字段
      printHide: false, // 打印隐藏该字段
      readonly: false,
      isRemark: false,
      remark: ''
    }
  }
];

// 属性配置
export const propsConfig = {
  common: { // 公共
    head: [
      { label: '字段名称', hide: ['grid', 'titleExplain', 'title'], bind: { maxlength: 12 }, formBind: { rules: [{ required: true, message: '请输入字段名称', trigger: 'change' }] }, key: 'name', type: 'input' }
    ],
    foot: [
      { label: '是否备注', key: 'isRemark', type: 'remarkInput',
        hide: ['title', 'grid', 'titleExplain', 'subform', 'linkForm', 'associatedApproval']
      },
      { label: '其他设置', hide: ['title', 'grid'], type: 'otherSetting', config: [
        { name: '必填', key: 'required', hide: ['workflowId', 'createTime', 'switch', 'createUser', 'formulaInput', 'titleExplain'] },
        { name: '禁用', key: 'disabled', hide: ['workflowId', 'createTime', 'subform', 'linkForm', 'createUser', 'formulaInput', 'associatedApproval', 'richEditor', 'titleExplain'] },
        { name: '只读', key: 'readonly', hide: ['title', 'titleExplain', 'grid', 'subform', 'linkForm', 'associatedApproval', 'workflowId', 'createUser', 'createTime'] },
        { name: '发起页隐藏', key: 'createHide' },
        { name: '详情页隐藏', key: 'detailHide' },
        { name: '打印隐藏该字段', key: 'printHide' },
        { name: '隐藏字段名称', key: 'isHideField' },
        { name: '设为条件字段', key: 'isCondition', hide: ['titleExplain', 'workflowId', 'createTime', 'createUser', 'richEditor'] },
        { name: '敏感词库校验', key: 'sensitiveWordVerify', show: ['input', 'textarea', 'richEditor'] },
        { name: '字段内容缓存', key: 'contentCache', show: ['input'] },
        { name: '自动采集', key: 'autoPick', show: ['link'] }
      ] },
      {
        label: '组件切换', type: 'switchType', show: ['input', 'textarea', 'link']
      },
      { label: '其他设置', show: ['title'], type: 'titleOtherSetting', config: [
        { name: '发起页隐藏', key: 'createHide', type: 'checkbox' },
        { name: '备注', key: 'requireTitleRemark', type: 'checkbox' },
        { name: '备注展示方式', key: 'titleRemarkWay', type: 'select', options: [{ value: 0, label: 'tips展示' }, { value: 1, label: '展开展示' }] },
        { name: '备注', key: 'titleRemarkContent', type: 'input', placeholder: '请输入备注内容', maxlength: 100 }
      ] }
    ]
  },
  input: [
    { label: '默认值', key: 'value', type: 'inputDefaultGroup' },
    { label: '格式限制', parentkey: 'options', key: 'dataType', formBind: { rules: [{ required: true, message: '请选择', trigger: 'change' }] }, type: 'select', bind: { labelName: 'label', keyName: 'value', listData: [{ value: 'string', label: '文本型' }, { value: 'number', label: '数值型' }] }},
    { label: '数值范围限制', type: 'numberRange', formBind: { rules: [{ required: true, message: '数值范围限制', trigger: 'change' }] }},
    { label: '小数位数（最多设置10位小数）', parentkey: 'options', key: 'precision', formBind: { isRequired: true }, type: 'inputNumber', bind: { min: 0, max: 10, step: 1, precision: 0 }},
    { label: '字符长度限制', parentkey: 'options', key: 'maxlength', formBind: { rules: [{ required: true, message: '请输入限制', trigger: 'change' }] }, type: 'input', bind: { type: 'number' }},
    { label: '提示语', parentkey: 'options', key: 'placeholder', type: 'input', bind: { maxlength: 50 }},
    { label: '描述', parentkey: 'options', key: 'tip', type: 'input', bind: { maxlength: 500 }},
    { label: '组件宽度', parentkey: 'options', key: 'width', type: 'inputNumber', bind: { min: 120, max: 1156, step: 10, precision: 0 }},
    { label: '字段加密及脱敏展示', propTip: '开启后，将对该字段值进行数据加密；首次保存后将无法再设置开关；', key: 'isSecret', type: 'secret' }
  ],
  link: [
    { label: '默认链接', key: 'value', type: 'input' },
    { label: '默认链接名称', parentkey: 'options', key: 'defaultLinkName', type: 'input', bind: { maxlength: 50, placeholder: '输入默认值' }},
    { label: '提示语', parentkey: 'options', key: 'placeholder', type: 'input', bind: { maxlength: 50 }},
    { label: '描述', parentkey: 'options', key: 'tip', type: 'input', bind: { maxlength: 500 }},
    { label: '组件宽度', parentkey: 'options', key: 'width', type: 'inputNumber', bind: { min: 120, max: 1156, step: 10, precision: 0 }}
  ],
  textarea: [
    { label: '可见行数', parentkey: 'options', key: 'rows', formBind: { rules: [{ required: true, message: '请输入行数', trigger: 'change' }] }, type: 'inputNumber', bind: { min: 1, max: 50, step: 1, precision: 0 }},
    { label: '开启自适应高度', parentkey: 'options', key: 'isResponsive', type: 'switch' },
    { label: '默认值', key: 'value', type: 'inputDefault' },
    { label: '字符长度限制', parentkey: 'options', key: 'maxlength', formBind: { rules: [{ required: true, message: '请输入限制', trigger: 'change' }] }, type: 'input', bind: { type: 'number' }},
    { label: '提示语', parentkey: 'options', key: 'placeholder', type: 'input', bind: { maxlength: 50 }},
    { label: '描述', parentkey: 'options', key: 'tip', type: 'input', bind: { maxlength: 500 }},
    { label: '组件宽度', parentkey: 'options', key: 'width', type: 'inputNumber', bind: { min: 120, max: 1156, step: 10, precision: 0 }}
  ],
  select: [
    { label: '组件切换', type: 'selectSwitchType' },
    { label: '选项及默认值', key: 'options', type: 'selectGroup', formBind: { rules: [{ required: true, message: '请设置选项', trigger: 'change' }] }},
    { label: '是否多选', parentkey: 'options', key: 'multiple', type: 'switch' },
    { label: '提示语', parentkey: 'options', key: 'placeholder', type: 'input', bind: { maxlength: 50 }},
    { label: '描述', parentkey: 'options', key: 'tip', type: 'input', bind: { maxlength: 500 }},
    { label: '组件宽度', parentkey: 'options', key: 'width', type: 'inputNumber', bind: { min: 120, max: 1156, step: 10, precision: 0 }}
  ],
  radio: [
    { label: '组件切换', type: 'selectSwitchType' },
    { label: '选项及默认值', key: 'options', type: 'selectGroup', formBind: { rules: [{ required: true, message: '请设置选项', trigger: 'change' }] }},
    { label: '描述', parentkey: 'options', key: 'tip', type: 'input', bind: { maxlength: 500 }}
  ],
  checkbox: [
    { label: '选项及默认值', key: 'options', type: 'selectGroup', bind: { multiple: true }, formBind: { rules: [{ required: true, message: '请设置选项', trigger: 'change' }] }},
    { label: '描述', parentkey: 'options', key: 'tip', type: 'input', bind: { maxlength: 500 }}
  ],
  date: [
    { label: '显示格式', parentkey: 'options', key: 'format', formBind: { rules: [{ required: true, message: '请选择', trigger: 'change' }] }, type: 'select', bind: { labelName: 'label', keyName: 'value', listData: [{ value: 'yyyy/MM', label: '年/月' }, { value: 'yyyy/MM/dd', label: '年/月/日' }, { value: 'yyyy/MM/dd HH:mm:ss', label: '年/月/日 时:分:秒' }] }},
    { label: '默认值', parentkey: 'options', key: 'isDefaultNowTime', type: 'select', bind: { labelName: 'label', keyName: 'value', listData: [{ value: 0, label: '无' }, { value: 1, label: '默认获取当前时间' }, { value: 2, label: '创建人入职日期' }, { value: 3, label: '创建人离职日期' }] }},
    { label: '提示语', parentkey: 'options', key: 'placeholder', type: 'input', bind: { maxlength: 50 }},
    { label: '描述', parentkey: 'options', key: 'tip', type: 'input', bind: { maxlength: 500 }},
    { label: '组件宽度', parentkey: 'options', key: 'width', type: 'inputNumber', bind: { min: 120, max: 1156, step: 10, precision: 0 }}
  ],
  switch: [
    { label: '默认值', key: 'value', type: 'switch' },
    { label: '描述', parentkey: 'options', key: 'tip', type: 'input', bind: { maxlength: 500 }}
  ],
  upAttachment: [
    { label: '文件限制大小', parentkey: 'options', key: 'limitFileSize', formBind: { rules: [{ required: true, message: '请选择', trigger: 'change' }] }, type: 'select', bind: { labelName: 'label', keyName: 'value', listData: [{ value: 5, label: '5MB' }, { value: 10, label: '10MB' }, { value: 50, label: '50MB' }, { value: 100, label: '100MB' }, { value: 300, label: '300MB' }, { value: 500, label: '500MB' }, { value: 1000, label: '1000MB' }] }},
    { label: '描述', parentkey: 'options', key: 'tip', type: 'input', bind: { maxlength: 500 }},
    { label: '字段加密及脱敏展示', propTip: '开启后，将对该字段值进行数据加密；首次保存后将无法再设置开关；', key: 'isSecret', type: 'secret' },
    { label: '开启一键下载', parentkey: 'options', key: 'isAllDownload', type: 'switch' }
  ],
  post: [
    { label: '默认值', key: 'defaultPost', type: 'postSelect' },
    { label: '允许多选', parentkey: 'options', key: 'isMultiple', type: 'switch' },
    { label: '提示语', parentkey: 'options', key: 'placeholder', type: 'input', bind: { maxlength: 50 }},
    { label: '描述', parentkey: 'options', key: 'tip', type: 'input', bind: { maxlength: 500 }},
    { label: '组件宽度', parentkey: 'options', key: 'width', type: 'inputNumber', bind: { min: 120, max: 1156, step: 10, precision: 0 }}
  ],
  address: [
    { label: '地址格式', parentkey: 'options', key: 'addressType', type: 'select', bind: { labelName: 'label', keyName: 'value', listData: [{ value: 'province', label: '省' }, { value: 'city', label: '省-市' }, { value: 'region', label: '省-市-区' }] }},
    { label: '提示语', parentkey: 'options', key: 'placeholder', type: 'input', bind: { maxlength: 50 }},
    { label: '描述', parentkey: 'options', key: 'tip', type: 'input', bind: { maxlength: 500 }},
    { label: '组件宽度', parentkey: 'options', key: 'width', type: 'inputNumber', bind: { min: 120, max: 1156, step: 10, precision: 0 }}
  ],
  title: [
    { label: '字段名称', bind: { maxlength: 50 }, formBind: { rules: [{ required: true, message: '请输入字段名称', trigger: 'change' }] }, key: 'name', type: 'input' },
    { label: '标题层级', parentkey: 'options', key: 'titleLevel', type: 'select', formBind: { rules: [{ required: true, message: '请选择', trigger: 'change' }] }, bind: { labelName: 'label', keyName: 'value', listData: [{ value: 1, label: '一级标题' }, { value: 2, label: '二级标题' }, { value: 3, label: '三级标题' }] }},
    { label: '描述', parentkey: 'options', key: 'describe', type: 'input', bind: { maxlength: 500 }}
  ],
  titleExplain: [
    { label: '字段内容', type: 'richEditorDefaultValue' }
  ],
  richEditor: [
    { label: '组件高度', parentkey: 'options', key: 'height', type: 'inputNumber', bind: { min: 300, max: 500, step: 10, precision: 0 }},
    { label: '组件宽度', parentkey: 'options', key: 'editorWidth', type: 'inputNumber', bind: { min: 300, max: 800, step: 10, precision: 0 }},
    { label: '图片缩放比例(%)', parentkey: 'options', key: 'imgRatio', type: 'inputNumber', bind: { min: 10, max: 100, step: 1, precision: 0 }},
    { label: '视频宽度', parentkey: 'options', key: 'videoWidth', type: 'inputNumber', bind: { min: 271, max: 1084, step: 1, precision: 0 }},
    { label: '视频高度', parentkey: 'options', key: 'videoHeight', type: 'inputNumber', bind: { min: 152, max: 608, step: 1, precision: 0 }},
    { label: '提示语', parentkey: 'options', key: 'placeholder', type: 'input', bind: { maxlength: 50 }},
    { label: '描述', parentkey: 'options', key: 'tip', type: 'input', bind: { maxlength: 500 }}
  ],
  grid: [
    { label: '布局', key: 'span', type: 'radioButton', options: [{ id: 12, name: '2列' }, { id: 8, name: '3列' }, { id: 6, name: '4列' }] }
  ],
  workflowId: [
    { label: '前缀', parentkey: 'options', bottomTip: '固定后缀：年月日+当日第几份创建的表单，如：20220101001', key: 'prefix', type: 'input', formBind: { rules: [{ required: true, message: '请输入前缀', trigger: 'change' }] }, bind: { maxlength: 4, placeholder: '请输入英文字母，限制4个' }}
  ],
  createUser: [
  ],
  createTime: [
    { label: '显示格式', parentkey: 'options', key: 'format', formBind: { rules: [{ required: true, message: '请选择', trigger: 'change' }] }, type: 'select', bind: { labelName: 'label', keyName: 'value', listData: [{ value: 'yyyy/MM', label: '年/月' }, { value: 'yyyy/MM/dd', label: '年/月/日' }, { value: 'yyyy/MM/dd HH:mm:ss', label: '年/月/日 时:分:秒' }] }}
  ],
  subform: [
    { label: '默认数据行', type: 'subformDefaultValue' },
    { label: '标题层级', parentkey: 'options', key: 'titleLevel', type: 'select', formBind: { rules: [{ required: true, message: '请选择', trigger: 'change' }] }, bind: { labelName: 'label', keyName: 'value', listData: [{ value: 1, label: '一级标题' }, { value: 2, label: '二级标题' }, { value: 3, label: '三级标题' }] }},
    { label: '描述', parentkey: 'options', key: 'tip', type: 'input', bind: { maxlength: 500 }},
    { label: '统计字段', parentkey: 'options', key: 'statistics', type: 'statistics' },
    { label: '自动填充上次填写内容', parentkey: 'options', key: 'isAutoFillIn', type: 'switch' },
    { label: '自动存储历史填写内容', parentkey: 'options', key: 'isAutoStorage', type: 'autoStorage' },
    { label: '隐藏操作项', parentkey: 'options', key: 'hideOperation', type: 'switch' },
    { label: '布局', key: 'isCard', parentkey: 'options', type: 'radioButton', options: [{ id: false, name: '列表' }, { id: true, name: '卡片' }] }

  ],
  linkForm: [
    { label: '标题层级', parentkey: 'options', key: 'titleLevel', type: 'select', formBind: { rules: [{ required: true, message: '请选择', trigger: 'change' }] }, bind: { labelName: 'label', keyName: 'value', listData: [{ value: 1, label: '一级标题' }, { value: 2, label: '二级标题' }, { value: 3, label: '三级标题' }] }},
    { label: '描述', parentkey: 'options', key: 'tip', type: 'input', bind: { maxlength: 500 }},
    { label: '选择需要关联的表单', key: 'subform', type: 'linkForm', formBind: { class: 'is-required' }},
    { label: '将数值型字段设为统计字段', parentkey: 'options', key: 'isStatistics', type: 'switch' },
    { label: '设置数据筛选条件', key: 'presetFilter', type: 'presetFilter' }
  ],
  associatedApproval: [
    { label: '标题层级', parentkey: 'options', key: 'titleLevel', type: 'select', formBind: { rules: [{ required: true, message: '请选择', trigger: 'change' }] }, bind: { labelName: 'label', keyName: 'value', listData: [{ value: 1, label: '一级标题' }, { value: 2, label: '二级标题' }, { value: 3, label: '三级标题' }] }},
    { label: '描述', parentkey: 'options', key: 'tip', type: 'input', bind: { maxlength: 500 }},
    { label: '以下表单不允许关联', key: 'banForms', type: 'banAssociated' }
  ],
  department: [
    { label: '默认值', parentkey: 'options', key: 'defaultValue', type: 'departmentDefault' },
    { label: '是否多选', parentkey: 'options', key: 'multiple', type: 'switch' },
    { label: '支持选择子级部门', parentkey: 'options', key: 'selectChild', type: 'switch' },
    { label: '设为部门权限取值字段', parentkey: 'options', key: 'setAuth', type: 'switch' },
    { label: '提示语', parentkey: 'options', key: 'placeholder', type: 'input', bind: { maxlength: 50 }},
    { label: '描述', parentkey: 'options', key: 'tip', type: 'input', bind: { maxlength: 500 }},
    { label: '组件宽度', parentkey: 'options', key: 'width', type: 'inputNumber', bind: { min: 120, max: 1156, step: 10, precision: 0 }}
  ],
  user: [
    { label: '默认值', type: 'userDefault' },
    { label: '所选人员默认可查看', parentkey: 'options', key: 'userRead', type: 'switch' },
    { label: '所选人员拥有发起人权限', parentkey: 'options', key: 'userAuth', type: 'switch' },
    // { label: '允许人员交接', parentkey: 'options', key: 'handover', type: 'switch' },
    { label: '是否多选', parentkey: 'options', key: 'multiple', type: 'switch' },
    { label: '使用弹窗选择样式', parentkey: 'options', key: 'useDialog', type: 'switch' },
    { label: '提示语', parentkey: 'options', key: 'placeholder', type: 'input', bind: { maxlength: 50 }},
    { label: '描述', parentkey: 'options', key: 'tip', type: 'input', bind: { maxlength: 500 }},
    { label: '组件宽度', parentkey: 'options', key: 'width', type: 'inputNumber', bind: { min: 120, max: 1156, step: 10, precision: 0 }}
  ],
  formulaInput: [
    { label: '设置公式', type: 'formula', formBind: { isRequired: true }},
    { label: '小数位数（最多设置10位小数）', parentkey: 'options', key: 'precision', formBind: { isRequired: true }, type: 'inputNumber', bind: { min: 0, max: 10, step: 1, precision: 0 }},
    { label: '提示语', parentkey: 'options', key: 'placeholder', type: 'input', bind: { maxlength: 50 }},
    { label: '描述', parentkey: 'options', key: 'tip', type: 'input', bind: { maxlength: 500 }},
    { label: '组件宽度', parentkey: 'options', key: 'width', type: 'inputNumber', bind: { min: 120, max: 1156, step: 10, precision: 0 }}
  ]
};
